package com.hnit.care.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalTime;
import java.util.Date;

/**
 * <p>
 * 药物类
 * </p>
 *
 * @author KingGigi
 * @since 2023-09-07
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("drug")
@Accessors(chain = true) //链式编程
public class Drug implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Integer id;

    /**
     * 药品名称
     */
    private String drugName;

    /**
     * 药品数量
     */
    private Integer drugNum;

    /**
     * 服药时间
     */
    private LocalTime drugTime;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}
